package com.example.yuekao;
import android.app.Application;
import com.example.mylibrary.global.GlobalConfig;
import com.example.mylibrary.utils.LogUtils;
import java.util.HashMap;
import okhttp3.logging.HttpLoggingInterceptor;


public class MyApplcation extends Application {

        @Override
        public void onCreate() {
            super.onCreate();
            HttpLoggingInterceptor httpLoggingInterceptor=new HttpLoggingInterceptor(new HttpLoggingInterceptor.Logger() {
                @Override
                public void log(String message) {
                    LogUtils.e(message);
                }
            });
            httpLoggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);


            HashMap<String, Object> stringObjectHashMap = new HashMap<>();
            stringObjectHashMap.put("cityid","1");
            MyInterCeptor myInterceptor = new MyInterCeptor();
            GlobalConfig.getInstance().addInterceptors(httpLoggingInterceptor)
                    .setBaseparams(stringObjectHashMap)
                    .addInterceptors(myInterceptor)
                    .addInterceptors(httpLoggingInterceptor);
        }
    }


